package com.example.demo.Service.Impl;

import com.example.demo.Bean.*;
import com.example.demo.Mapper.AdminMapper;
import com.example.demo.Service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public int insertAdmin(Admin admin) {
        return adminMapper.insertAdmin(admin);
    }

    @Override
    public Admin selectAdmin(String username) {
        return adminMapper.selectAdmin(username);
    }

    @Override
    public Role selectRole(String username) {
        return adminMapper.selectRole(username);
    }

    @Override
    public List<AdminProducts> selectAllProduct() {
        return adminMapper.selectAllProduct();
    }

    @Override
    public int updateProduct(UpdateProduct updateProduct) {
        return adminMapper.updateProduct(updateProduct);
    }

    @Override
    public List<AdminProducts> selectAllCheck() {
        return adminMapper.selectAllCheck();
    }

    @Override
    public int updateStatus(UpdateParameter updateParameter) {
        return adminMapper.updateStatus(updateParameter);
    }

    @Override
    public List<AllUser> getAllUser() {
        return adminMapper.getAllUser();
    }

    @Override
    public List<AllShop> getAllShop() {
        return adminMapper.getAllShop();
    }

    @Override
    public List<AllAdmin> getAllAdmin() {
        return adminMapper.getAllAdmin();
    }

    @Override
    public int getAdminId(String username) {
        return adminMapper.getAdminId(username);
    }

    @Override
    public int insertRole(Integer id) {
        return adminMapper.insertRole(id);
    }

    @Override
    public int updateRole(RoleChange roleChange) {
        return adminMapper.updateRole(roleChange);
    }

    @Override
    public List<Coupon> checkCoupon() {
        return adminMapper.checkCoupon();
    }

    @Override
    public int updataCouponStatus(UpdateCouponParameter updateCouponParameter) {
        return adminMapper.updataCouponStatus(updateCouponParameter);
    }

    @Override
    public List<AllShop> getCheckShop() {
        return adminMapper.getCheckShop();
    }

    @Override
    public int updateShopStatus(UpdateStatusParameter updateStatusParameter) {
        return adminMapper.updateShopStatus(updateStatusParameter);
    }

    @Override
    public List<AdminProducts> getTopSellProduct() {
        return adminMapper.getTopSellProduct();
    }

    @Override
    public List<IndexProducts> getIndexProduct() {
        return adminMapper.getIndexProduct();
    }

    @Override
    public ChangIndexParameter getChangIndexParameter(CommentParameter commentParameter) {
        return adminMapper.getChangIndexParameter(commentParameter);
    }

    @Override
    public int updateIndexProduct(IndexProducts indexProducts) {
        return adminMapper.updateIndexProduct(indexProducts);
    }

    @Override
    public List<PaySuccessOrders> getAllPaySuccessOrders() {
        return adminMapper.getAllPaySuccessOrders();
    }

    @Override
    public List<PaySuccessOrders> getAllPaySuccessOrdersByShopName(String shopname) {
        return adminMapper.getAllPaySuccessOrdersByShopName(shopname);
    }

    @Override
    public List<CheckSeckill> getAllSeckill() {
        return adminMapper.getAllSeckill();
    }

    @Override
    public int updateSeckillStatus(SeckillStatusParameter seckillStatusParameter) {
        return adminMapper.updateSeckillStatus(seckillStatusParameter);
    }

    @Override
    public int getAllPayOrders() {
        return adminMapper.getAllPayOrders();
    }

    @Override
    public int getAllRefundOrders() {
        return adminMapper.getAllRefundOrders();
    }

    @Override
    public List<ShopOrders> getAllOrders() {
        return adminMapper.getAllOrders();
    }


}
